import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询
export function listillness(query) {
  return request({
    url: '/aqsc/illness/list',
    method: 'get',
    params: query
  })
}

// 根据id查询
export function getillness(id) {
  return request({
    url: '/aqsc/illness/' + parseStrEmpty(id),
    method: 'get'
  })
}

// 新增
export function addillness(data) {
  return request({
    url: '/aqsc/illness',
    method: 'post',
    data: data
  })
}

// 修改
export function updateillness(data) {
  return request({
    url: '/aqsc/illness',
    method: 'put',
    data: data
  })
}



// 删除
export function delillness(ids) {
  return request({
    url: '/aqsc/illness/' + ids,
    method: 'delete'
  })
}
// 文件上传
export function uploadAvatar(data) {
  return request({
    url: '/aqsc/illness/avatar',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
